home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
gfx
/
misc
/
MWBNail10.lha
/
MWBNail 1.0
/
MWBNail.ifx
< prev
next >
Wrap
Text File
|
1995-06-05
|
2KB
|
125 lines
/*
* $VER: MWBNail 1.0 (5.6.95)
*/
OPTIONS RESULTS
SIGNAL ON BREAK_C
/* set render mode to Amiga */
GetRender
if result ~= 'Amiga'
then SetRender 'Amiga'
/* set screen, color depth, and dither mode */
Render ModeName 'NTSC:High Res Laced'
Render Colors 8
Render Dither 1 0 3
/* set palette */
Palette 8
LockRange 8 Off
GrabPalette Workbench
SetRange 8 0 7
LockRange 8 On
Redraw Off
inpattern = GETCLIP('WIMP_In')
Gadget.1 = 'S/120/20/Input pattern:/'inpattern
ComplexRequest '"MWBNail 1.0 by George L. Coulouris"' 1 Gadget 300 60
IF rc ~= 0 THEN EXIT
inpattern = result.1
CALL SETCLIP('WIMP_In', inpattern)
i = INDEX(outpattern, '#?')
IF i ~= 0 THEN DO
preout = LEFT(outpattern, i-1)
postout = SUBSTR(outpattern, i+2)
END
ELSE DO
i = INDEX(outpattern, '*')
IF i ~= 0 THEN DO
preout = LEFT(outpattern, i-1)
postout = SUBSTR(outpattern, i+1)
END
END
/* determine input directory path */
indir = ''
i = LASTPOS('/', inpattern)
IF i = 0 THEN i = LASTPOS(':', inpattern)
IF i ~= 0 THEN DO
indir = LEFT(inpattern, i)
END
/* list all files matching the pattern */
ADDRESS COMMAND 'c:List >RAM:__WIMP_TEMP__ NOHEAD LFORMAT='indir'%s' inpattern
IF rc ~= 0 THEN DO
RequestNotify 'Error listing pattern files.'
EXIT
END
/* sort alphabetically */
ADDRESS COMMAND 'c:Sort RAM:__WIMP_TEMP__ TO RAM:__WIMP_LIST__'
ADDRESS COMMAND 'c:Delete RAM:__WIMP_TEMP__ QUIET'
IF ~OPEN(infile, 'RAM:__WIMP_LIST__', 'Read') THEN DO
RequestNotify 'Cannot read pattern files.'
EXIT
END
Undo Off
LockInput
f = 1
/* go through the list one by one */
DO WHILE ~EOF(infile)
nextfile = READLN(infile)
IF ( (nextfile ~= "") & ~(exists(nextfile||'.info')) ) THEN DO
Render Close
files.f = nextfile; f = f + 1
Message nextfile
LoadBuffer '"'nextfile'"' Force loadopt
IF rc ~= 0 THEN DO
RequestNotify 'Error loading file ('rc').'
LEAVE
END
Scale 20 20 percent
Render Go
SaveRenderedAs Icon nextfile
Render Close
END
END
CALL CLOSE(infile)
ADDRESS COMMAND 'c:Delete RAM:__WIMP_LIST__ QUIET'
Redraw On
KillBuffer Force
UnlockInput
Undo On
EXIT
BREAK_C:
ADDRESS COMMAND 'c:Delete RAM:__WIMP_LIST__ QUIET'
KillBuffer Force
UnlockInput
Undo On
EXIT